import React from 'react';
import { EChartsOption } from 'echarts'
import Echart from './index';

function Zhu(props) {
    const option = {
        dataset: [
            {
              dimensions: ['name', 'age', 'profession', 'score', 'date'],
              source: [
                ['确诊管理', 50, 'Engineer', 3, '2011-02-12'],
                ['密切接触管理', 20, 'Teacher', 10, '2011-03-01'],
                ['中高风险地区管理 ', 52, 'Musician', 10, '2011-02-14'],
                ['低风险地区管理', 37, 'Teacher', 48, '2011-02-18'],
              ]
            },
            {
              transform: {
                type: 'sort',
                config: { dimension: 'score', order: 'desc' }
              }
            }
          ],
          xAxis: {
            type: 'category',
            axisLabel: { interval: 0, rotate: 0 }
          },
          yAxis: {
            max:50,
            min:0
          },
          series: {
            type: 'bar',
            encode: { x: 'name', y: 'score' },
            datasetIndex: 1
          }
    }
    return (
        <Echart option={option}/>
    );
}

export default Zhu;